; No68kHere - puts up an alert with a Quit button. Used to post an alert ; if a PPC-only program is started on a 68K machine. (NO machine testing: does ; the same thing if run in emulation on a PowerMac (a file with no cfrg resource)). ; Should add < 200 bytes total size to your program, compared to at least 2K for ; the smallest possible C version. ; ; Should work on any Mac, 128K on up. Simply copy the resource fork to your ; application (most development systems do this automatically). You can also ; do it manually with Resedit or use a Rez/Resorcerer final build script. ; This effectively creates a fat binary, whose 68K version exists only to ; notify the user that a PPC is required. ; ; You can supply any ALRT desired (simple default model provided). Alert must ; have ID = 9999, and an enabled item to dismiss with. (ALRT ID is hard coded ; but changeable: look for $03E7 in CODE 1). ; ; DO NOT modify or reuse this code unless you totally understand it! ; No68kHere was designed to be as small as possible, and it does ; several things (to save space) that would be disastrous in a "real" app. ; ; No68kHere is free to anyone who can use it. It appears stable and no problems ; have been reported, but the author makes no promises. Test your own app or die! ; ; Source code is provided for the interested - again, do not use this ; as an example of good Assembly language style. ; pea -$1E00(sp) ; shove the GrafPort on the stack. (NOT normally recommended) _InitGraf ; Minimum Init calls determined empirically _InitFonts _InitWindows clr.l -(sp) ; No restartProc _InitDialogs move.w #$03E7,-(sp) ; parameters for _Alert clr.l -(sp) _Alert _ExitToShell ; ignore _Alert return value ; ; Comments/complaints: feel free to email PaulS101@aol.com or PaulS101@gate.ioa.com